1. Field of the Invention
The present invention relates to image processing, and more particularly, to an image processing method and apparatus for enhancing an image by correcting a distortion caused by fog in a foggy environment.
2. Description of the Related Art
Fog comprises droplets of water vapor suspended in air near the Earth's surface. Generally, visual impairment occurs in fog such that a visual range is reduced to below 1 km. When there is fog, water particles are generated in the air and light is scattered due to the water particles. Light scattering refers to a phenomenon in which light strikes particles in the air and thus, the light changes its path, and looks different according to the waveform of light and the sizes of the particles.
In general, light scattering is mainly modeled as either Rayleigh or Mie scattering. Rayleigh scattering models are applied when particles causing light scattering are much smaller in diameter than the wavelength of light and, in this case, scattering energy is inversely proportional to the wavelength to the power of four (λ4). For example, when light is scattered due to air molecules on a sunny day, blue light is scattered more than red light, and the sky looks blue. However, in some cases particles causing light scattering are much larger in diameter than the waveform of light. In such cases, Mie scattering models are applied. Water particles in fog, which have diameters of several to several ten μm, are larger than the wavelength of visual light, which is about 400 to 700 nm and thus Mie scattering models are applied to fog. According to Mie scattering models, when particles causing light scattering, such as water particles, are large, scattering is less influenced by the wavelength, and every wavelength of light in the visual spectrum is scattered by almost the same amount. Thus, subjects look blurred in fog. In this case, a type of light, which occurs in a foggy environment, is generated and hereinafter will be referred to as airtight.
Image enhancement achieved by performing fog distortion correction can solve a problem of visual impairment, can make a blurred image clear, and is important as a pre-process procedure for recognition by restoring information regarding text, objects, etc., which is obscured due to fog.
An existing method of removing fog from an image is mainly segmented into a non-modeling method and a modeling method. An example of the non-modeling method is a histogram equalization method that redistributes luminance values of an image by analyzing a histogram of the image. However, despite being easy to perform and having good image enhancement characteristics, the histogram equalization method is not appropriate for a foggy image which has a non-uniform depth. Also, the histogram equalization method is appropriate for enhancing a general image but cannot sufficiently reflect the influence of fog on an image. Thus, a thick foggy image can only be slightly enhanced by using the histogram equalization method.
The modeling method uses data obtained by modeling the influence of light scattering caused by fog, on an image. A method of correcting a distortion caused by fog by estimating a scene depth by comparing two or more images obtained in different weather conditions, and correcting the scene depth, is disclosed in “Contrast restoration of weather degraded images” by S. G. Narasimhan and S. K. Nayar in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 25, pp. 713-724, 2003. However, in the above method, two or more images obtained in different weather conditions should be input and thus, for real-time implementation, changes in weather conditions have to be sensed and also a space for storing images is required. Furthermore, a cycle of weather changes cannot be predicted and thus an image storing cycle cannot be easily determined. In addition, completely identical scenes have to be photographed and thus, if a moving subject exists, an error can occur when a distortion caused by fog is estimated.
A method of correcting distortion caused by fog by estimating pixel values of an image, which vary due to fog, and subtracting the pixel values from the image, is disclosed in “Correction of Simple Contrast Loss in Color Images” by J. P. Oakley and H. Bu in IEEE Transactions on Image Processing, vol. 16, pp. 511-522, 2007. The above method is performed on the assumption that fog is uniform, and thus can be applied to only uniform and thin fog. However, fog is not uniform in most cases and, even when fog is uniform, a degree of influence of fog varies based on the distance between a camera and a subject. Thus, the above method cannot be easily applied to actual cases.